#ifndef ACTIONMANAGER_H_
#define ACTIONMANAGER_H_

#include <wx/string.h>
#include <wx/datetime.h>
#include <wx/timer.h>
#include <map>
#include <vector>
#include "../Buddy.h"
#include "../Actions.h"
#include "Action.h"

namespace Impp
{


class ActionManager : public wxTimer
{
private:
	ActionId nextAxtionId;
	std::vector<Action*> actions;

public:
	ActionManager();
	virtual ~ActionManager();

	ActionId insertAction(Action* action);
	void deleteAction(const ActionId & id, bool actionSuccess);
	int getActionData(const ActionId & id, const wxString & name);
	bool setActionData(const ActionId & id, const wxString & name, const int & value);

	void lockAction(const ActionId & id);
	void unLockAction(const ActionId & id);

	Action* getAction(const wxString & actionClassName, Buddy* buddy);
	Action* getAction(const ActionId & id);

private:
	void Notify();

};

}

#endif /*ACTIONMANAGER_H_*/
